﻿using System.Collections.Generic;
using SellAndBuy.Domain.Core;

namespace SellAndBuy.Domain.Entities
{
    /// <summary>
    /// Item definition
    /// </summary>
    public class Item : PicturableBase, IAggregateRoot
    {
        /// <summary>
        /// Private default constructor
        /// </summary>
        private Item()
        {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="category">Category</param>
        public Item(ItemCategory category)
        {
            Category = category;
        }

        /// <summary>
        /// Item name
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Item description
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Item category
        /// </summary>
        public ItemCategory Category { get; private set; }

        /// <summary>
        /// Available conditions
        /// </summary>
        public IEnumerable<ItemCondition> AvailableConditions
        {
            get { return Category.AvailableConditions; }
        }

    }
}
